package tasktracker.abstraction;

import java.util.HashMap;
import java.util.Map;

public class TaskInfo {

	private String guid;

	private String inputPath;
	private String outputPath;

	private Map<String, String> properties;

	private int status;
	private TaskProgressInfo progress;

	public String getGuid() {
		return guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	public String getInputPath() {
		return inputPath;
	}

	public void setInputPath(String inputPath) {
		this.inputPath = inputPath;
	}

	public String getOutputPath() {
		return outputPath;
	}

	public void setOutputPath(String outputPath) {
		this.outputPath = outputPath;
	}

	public Map<String, String> getProperties() {
		return properties;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public TaskProgressInfo getProgress() {
		return progress;
	}

	public void setProgress(TaskProgressInfo progress) {
		this.progress = progress;
	}

	public TaskInfo(String guid) {
		properties = new HashMap<String, String>();
		this.guid = guid;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof TaskInfo))
			return false;
		TaskInfo task = (TaskInfo) obj;
		return getGuid().equals(task.getGuid());
	}

	@Override
	public int hashCode() {
		return getGuid().hashCode();
	}
}
